package database.demo;

import android.content.ContentValues;
import android.text.format.DateFormat;

/**
 * Store information about a passenger.
 */
public class Passenger {
	private String ID;
	private String lastname;
	private String firstname;
	private String phone;
	private String email;
	private String note;
	private boolean present;
	private String update;

	//full constructor
	public Passenger(String ID, String lastname, String firstname, String phone, String email, String update) {
		super();
		this.ID =ID;
		this.lastname = lastname;
		this.firstname = firstname;
		this.phone = phone;
		this.email = email;
		this.update = update;
	}
	
	//partial constructor
	public Passenger(String ID) {
		super();
		this.ID =ID;
	}
	
	//empty constructor
	public Passenger() {
		super();
	}
	
	public String getID() {
		return ID;
	}
	
	public String getLastName() {
		return lastname;
	}
	
	public String getFirstName() {
		return firstname;
	}
	
	public String getPhone() {
		return phone;
	}
	
	public String getEmail() {
		return email;
	}
	
	public String getUpdate() {
		return update;
	}
	
	public String getNote() {
		return note;
	}
	
	public boolean getPresent() {
		return present;
	}
	public ContentValues getValues(){
		ContentValues values = new ContentValues();
		values.put(DataBaseWrapperPassengers.PASSENGER_ID, ID);
		values.put(DataBaseWrapperPassengers.PASSENGER_LASTNAME, lastname);
		values.put(DataBaseWrapperPassengers.PASSENGER_FIRSTNAME, firstname);
		values.put(DataBaseWrapperPassengers.PASSENGER_PHONE, phone);
		values.put(DataBaseWrapperPassengers.PASSENGER_EMAIL, email);
		values.put(DataBaseWrapperPassengers.PASSENGER_UPDATE, update);
		
		return values;
	}
	
	
	public void setID(String iD) {
		ID = iD;
	}

	public void setLastName(String lastname) {
		this.lastname = lastname;
	}
	
	public void setFirstName(String firstname) {
		this.firstname = firstname;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public void setUpdate(String update) {
		this.update = update;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public void setPresent(boolean present) {
		this.present = present;
	}
	@Override
	public String toString() {
		return lastname +" " +firstname + " - "+ ID;
	}
}
